package common.dto.goodsdto;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.util.List;

import javax.validation.constraints.NotBlank;

/**
 * 商品分类DTO
 * 常用于建立商品分类树
 */
@Data
public class CategoryDTO {
    @NotBlank(message = "分类名称不能为空")
    private String name;
    @Range(min=1, max=3) 
    private Long id;
    private Boolean isLeaf;
    private Integer level;
    private Long parentId;
    private String attributeTemplate;
    private List<CategoryDTO> children;
}
